JavaScript

{dialog.object}getKey Method

Syntax

{dialog.Object}.getKey(alias [, row]);

Arguments

aliasstring

Specified table alias to use.

rownumber

Source row in the repeating section.

Returns

resultAny Type

Returns the primary key if the record was found. Otherwise, returns false.

Description

Gets the primary key value for the specified table alias.

Discussion

If the UX component has been bound to tables, it gets the primary key value for the specified table alias. If a row is not specified, the alias is a top level alias. Otherwise, a row indicates the row in a Repeating Section. Returns false if no key was found (which indicates that you are editing a new record, rather than an existing record).

Example

Get the primary key for the INVOICE_ITEMS alias in row 3 of the Repeating Section:

{dialog.Object}.getKey('INVOICE_ITEMS',3);

See Also